package com.mxf.code.proxy.static_proxy;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Copyright (C), 2017-2022, mxf
 * Author: 28382
 * Date: 2022/10/13 16:22
 * FileName: TestProxyController
 * Description: 代理类测试
 */
@RestController
public class TestProxyController {

    @Qualifier("proxySubject")
    @Autowired
    private Subject subject;

    @Qualifier("proxyRealSubject")
    @Autowired
    private Subject realSubject;

    @GetMapping("/testProxyControl")
    public void testProxyControl(){
        subject.doSomething();
    }

    @GetMapping("/testProxyControl2")
    public void testProxyControl2(){
        realSubject.doSomething();
    }
}
